/**
 * 
 */
package cn.ad.server.web.servlet.v2.parser;

import cn.ad.server.web.servlet.v2.requests.ClickRequest;
import cn.ad.server.web.servlet.v2.requests.TrackingRequest;

import javax.servlet.http.HttpServletRequest;

/**
 * 广点通监测请求解析-点击
 * @author Wu Chengjun
 *
 */
public class GDTClickRequestParser extends GDTTrackingRequestParser {
	/**
	 * 请求参数名--跳转目的地址
	 */
	public static final String PARAM_TARGET_URL = "target";
	

	/* (non-Javadoc)
	 * @see cn.falconnect.adserver.adapter.GDTTrackingRequestParser#readTrackingParam(javax.servlet.http.HttpServletRequest, cn.falconnect.adserver.adapter.TrackingRequest)
	 */
	@Override
	public void readTrackingParam(HttpServletRequest request, TrackingRequest trackingRequest)
			throws AdRequestParseException {
		super.readTrackingParam(request, trackingRequest);
		((ClickRequest)trackingRequest).setTarget(request.getParameter(PARAM_TARGET_URL));
	}

	/* (non-Javadoc)
	 * @see cn.falconnect.adserver.adapter.TrackingRequestParser#createTrackingRequest(javax.servlet.http.HttpServletRequest)
	 */
	@Override
	public TrackingRequest createTrackingRequest(HttpServletRequest request) throws AdRequestParseException {
		return new ClickRequest();
	}

}
